import request from '@/utils/request'
import { downFile } from '@/utils/request'

/**
* 代码生成分页查询
* @param {查询条件} data
*/
export function listCksAlarmMessageConfig(query) {
  return request({
    url: 'business/CksAlarmMessageConfig/list',
    method: 'get',
    params: query,
  })
}

/**
* 新增代码生成
* @param data
*/
export function addCksAlarmMessageConfig(data) {
  return request({
    url: 'business/CksAlarmMessageConfig',
    method: 'post',
    data: data,
  })
}
/**
* 修改代码生成
* @param data
*/
export function updateCksAlarmMessageConfig(data) {
  return request({
    url: 'business/CksAlarmMessageConfig',
    method: 'PUT',
    data: data,
  })
}
/**
* 获取代码生成详情
* @param {Id}
*/
export function getCksAlarmMessageConfig(id) {
  return request({
    url: 'business/CksAlarmMessageConfig/' + id,
    method: 'get'
  })
}

/**
* 删除代码生成
* @param {主键} pid
*/
export function delCksAlarmMessageConfig(pid) {
  return request({
    url: 'business/CksAlarmMessageConfig/delete/' + pid,
    method: 'delete'
  })
}
// 导出代码生成
export async function exportCksAlarmMessageConfig(query) {
  await downFile('business/CksAlarmMessageConfig/export', { ...query })
}
